﻿#region Using Statements
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using starLiGHT.ParticleSystem.Common;
using starLiGHT.ParticleSystem.twoD;
using Microsoft.Xna.Framework.Content;
using starLiGHT.ParticleSystem.PulseGenerators;
using starLiGHT.ParticleSystem.Initializer;
using starLiGHT.ParticleSystem.Initializer.TwoD;
using starLiGHT.ParticleSystem.Modifier.twoD;
#endregion

namespace starLiGHT.Sandbox.Particles
{
    //public class Snowfall : starLiGHT.SceneManagement.ParticleSystem
    //{
    //    public readonly Emitter2D emitter;

    //    public Snowfall(ContentManager content)
    //    {
    //        emitter = new Emitter2D("Snowfall");

    //        emitter.PulseGenerator = new Steady(25);

    //        emitter.addInitializer(new TextureInitializer(content.Load<Texture2D>("radialDot2")));
    //        emitter.addInitializer(new Position(new LineRegion(new Vector2(-5, -5), new Vector2(805, -5))));
    //        emitter.addInitializer(new Velocity(new PointRegion(new Vector2(0, 65))));
    //        emitter.addInitializer(new Scale(0.15f, 1.00f));

    //        emitter.addModifier(new Move());
    //        emitter.addModifier(new DeathRegion(new RectangleRegion(-10, -10, 820, 620), true));
    //        emitter.addModifier(new RandomDrift(new Vector2(30, 30)));
    //    }
    //}

    public class Snowfall : Emitter2D
    {
        public Snowfall(ContentManager content)
            : base("Snowfall")
        {
            PulseGenerator = new Steady(25);

            addInitializer(new TextureInitializer(content.Load<Texture2D>("radialDot2")));
            addInitializer(new Position(new LineRegion(new Vector2(-5, -5), new Vector2(805, -5))));
            addInitializer(new Velocity(new PointRegion(new Vector2(0, 65))));
            addInitializer(new Scale(0.15f, 1.00f));

            addModifier(new Move());
            addModifier(new DeathRegion(new RectangleRegion(-10, -10, 820, 620), true));
            addModifier(new RandomDrift(new Vector2(30, 30)));
        }
    }
}
